Skip to content

fix(receiver/sshcheckreceiver): apply the configured timeout - #50912

Open
ogulcanaydogan wants to merge 1 commit into
open-telemetry:mainfrom
ogulcanaydogan:fix/sshcheck-timeout-not-applied
Open

fix(receiver/sshcheckreceiver): apply the configured timeout#50912
ogulcanaydogan wants to merge 1 commit into
open-telemetry:mainfrom
ogulcanaydogan:fix/sshcheck-timeout-not-applied

Conversation

@ogulcanaydogan

Copy link
Copy Markdown
Contributor

Description

ToClient built the ssh.ClientConfig without setting Timeout, so the configured timeout never reached the underlying SSH connection. As a result, an unresponsive endpoint could cause the dial to hang indefinitely regardless of the configured value.

This change propagates the configured timeout to ssh.ClientConfig.Timeout.

Link to tracking issue

N/A - found while reviewing the code; there is no tracking issue.

Testing

Added an assertion to the existing TestAllSSHClientSettings test verifying that client.Timeout matches the configured value.

Without the fix, 5 of 6 subtests fail with the configured timeout expected (for example, 5s) but the actual value remaining 0s.

Documentation

N/A

Authorship

  • I, a human, wrote this pull request description myself.

ToClient built the ssh.ClientConfig without setting Timeout, so the
configured timeout never reached the underlying SSH connection: an
unresponsive endpoint could hang the dial indefinitely regardless of
the configured value.

Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant